<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>

<title>申报特例</title>
<script type="text/javascript"
	src="${res}/js/exception/irisException.js"></script>
<script type="text/javascript" src="${res}/js/validate/irisvalidator.js"></script>
<script type="text/javascript" src="${res}/js/jquery/jquery.form.js"></script>
<script type="text/javascript" src="${res}/js/jquery/jquery.json.js"></script>
<style>
.checkbox_dyn_grant_exception {
	
	HEIGHT: 200;
	BACKGROUND-COLOR:  transparent;
	OVERFLOW: auto;
	scrollbar-face-color: #FFFFFF;
	scrollbar-highlight-color: #FFFFFF;
	scrollbar-3dlight-color: #F2F2F2;
	scrollbar-shadow-color: #999CC;
	scrollbar-darkshadow-color: #F2F2F2;
	scrollbar-track-color: #FFFFFF;
	scrollbar-arrow-color: #9999CC
}
</style> 
<style type="text/css">
.t_css input { padding:2px 8px 0pt 3px; height:20px; _height:22px ;border:1px solid #a1c0dc; background-color:#FFF; }
</style>
<script type="text/javascript">
var prcWin = new progressWin("${res}");//初始化遮罩层
	$(function() {
		$("table.t_css").each(function() {
			$(this).find("tr:even").addClass("li_1");
			$(this).find("tr:odd").addClass("li_2");
		});
		
		$("#wbox1").click(function() {
		
		});
		

		initControl();
		
		

		
		
	});
	
	 function check() {
		
		validate($("#mapMsg"), "");
		
		if (!valResult()) {
			irisValShowMsg($("#wbox1"));
			return false;
		}
		
		return true;
	} 
	 function backToList(){
	    	window.location.href = ctx + "/prpapprove/list-for-grant-special?flag=init";
	    }
 function submitValue(){
	 if (check()) {
	    var id = $("#id").val();
		 var endDate = $("#endDate").val();
		 var remark = $("#remark").val();
		 var excludeRules = $("#rule_value").val();
		 var parameters = "{'id':'" + id+ "','endDate':'"+endDate+"','remark':'"+remark+"','excludeRules':'" + excludeRules+ "'}";				
		 var options = {
					type : 'post',
					data : {
						'parameters' : parameters
					},
					beforeSend : function() {
					}, // 表单提交前的回调函数
					success : function(msg) {
						if (msg.result == 'SQLError') {
							prcWin.closeWin();// 关闭遮罩层
							scmError("操作失败！");
						} else {
							prcWin.closeWin();// 关闭遮罩层
							scmSuccess('操作成功！',null,3000);
							back();
							

						}
					},// 表单成功提交后的回调函数
					error : function() {
						scmError("操作失败！");
						prcWin.closeWin();
					},
					url : "${ctx}/prpapprove/updateGrantSpecial"
				};

				$.ajax(options);
	 }
	 
	
	 
 }
	
	function removeValue(){
		$(':input','#mapMsg') .not(':button, :submit, :reset, :hidden,:disabled') .val('') .removeAttr('checked') .removeAttr('selected');
	}
	
</script>
</head>

<body>
<input id="wbox1" type="hidden" />
	<table class="t_css" width="100%" border="0" cellpadding="0"
		cellspacing="0" id="mapMsg">
			<input type="hidden" name="id" id="id" value="${mapMsg.id}" />
		<tr>
			<td align="right" width="15%" >项目类别：</td>
			<td colspan="1" width="25%" >${mapMsg.zhCnGrantName}</td>
		<td align="right" width="15%" >项目负责人：</td>
			<td colspan="1" width="25%" >${mapMsg.zhName}</td>
		</tr>
		<tr>
		<td align="right" width="20%" >组织形式:</td>
			<td colspan="1">
			<c:if test="${mapMsg.orgType eq '01'}">自由申报</c:if>
			<c:if test="${mapMsg.orgType eq '02'}">组织性项目</c:if>
			<c:if test="${mapMsg.orgType eq '03'}">招标项目</c:if>
			</td>
			<td align="right"><span class="color_red">*</span>截止日期：</td>
			<td colspan="1">
			<c:set var="endDate"><fmt:formatDate value="${mapMsg.endDate}" pattern="yyyy-MM-dd"/></c:set>
			<cpt:date id="endDate" name="endDate" value="${endDate}" size="27" className=" required date" label="截止日期"></cpt:date> 		    </td>
		</tr>
    	<tr>
    		<td align="right" width="25%"style="border: 0px solid">直接提交至省科技厅：</td>
				<td align="left" style="border: 0px solid">
				<c:if test="${mapMsg.submitFlag == 1 }">
				<input style="border: 0px solid" type="checkbox" name="submitFlag" checked="checked" disabled="disabled"  />
				</c:if>
				<c:if test="${mapMsg.submitFlag == 0 || mapMsg.submitFlag == null}">
				<input style="border: 0px solid" type="checkbox" name="submitFlag" disabled="disabled" />
				</c:if>
				</td>
    	  <td align="right">年度：</td>
			<td colspan="1">${mapMsg.statYear}</td>
    	</tr>
    	  <tr id="rule_exception" >
			<td align="right">选择跳过的业务规则：</td>
			<td colspan="3">
			 <cpt:checkbox key="grant_exception1" name="rule" width="100%"
					repeatColumn="1" style="border: 0px; padding: 0px; margin: 0px;"  ></cpt:checkbox>
				<input name="rule_value" id="rule_value" value="${mapMsg.excludeRules}" type="hidden">
			</td>
		</tr> 
		<tr>
			<td align="right"><span class="color_red">*</span>备注：</td>
			<td colspan="3"><textarea style="WIDTH: 600px" name="remark"
					rows="5" id="remark" class="required" label="备注"   maxlength="500">${mapMsg.remark}</textarea></td>
		</tr>
		
	</table>
	<div class="bar_btn02" align="center">
             <input type="button"
			class="button_01" value=" 返 回" onclick="cancel();" /> &nbsp;<input type="button" class="button_01" value=" 提 交 "  
					onclick="submitValue();"/> &nbsp;  <input type="button" class="button_01" value=" 重 置 "
			onclick="removeValue();" /> 
			</div>



</body>
</html>